

var add_node, btn_style;
var strurl=window.location.href;
var sum = strurl.lastIndexOf('/');
var filename = strurl.substring(sum+1);
//var nameArr = filename.split(".");
//var name = nameArr[0];

function add_func(htmlName,showName){
	if(htmlName == filename){
		t_h3.innerHTML = '经验 - 实例 - '+showName
		btn_style = 'primary';
	}else{
		btn_style = 'default';
	}
	var a = document.createElement("a");
	add_node = add_a.appendChild(a);
	add_node.setAttribute("href",htmlName);
	add_node.setAttribute("class","btn btn-"+btn_style);
	add_node.innerHTML = showName;
}

add_func('js.html',"js");
add_func('jq.html',"jq");
add_func('css.html',"css");
add_func('html.html',"html");
add_func('php.html',"php");
add_func('d3.html',"d3");
add_func('echarts.html',"ECharts");



